package com.zodiac.alioth.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 接口响应状态枚举类
 *
 * @author zodiac
 */
@Getter
@AllArgsConstructor
public enum ApiRespCodeEnum {

    /**
     * 操作成功
     */
    SUCCESS(200, "success"),

    /**
     * 未授权
     */
    UNAUTHORIZED(401, "未授权"),

    /**
     * 无权限
     */
    FORBIDDEN(403, "您没有权限访问！"),

    /**
     * 未找到
     */
    NOT_FOUND(404, "资源不存在！"),

    /**
     * 服务器内部错误
     */
    ERROR(500, "服务器内部错误！"),

    BAD_REQUEST(900001, "请求参数类型错误异常！"),

    BOUND_STATEMENT_NOT_FOUNT(900002, "BOUND_STATEMENT_NOT_FOUNT！"),

    DATABASE_ERROR(900003, "DATABASE_ERROR！"),

    CONNECTION_ERROR(900004, "CONNECTION_ERROR！"),

    METHOD_NOT_ALLOWED(900004, "METHOD_NOT_ALLOWED！"),

    ;

    private final Integer code;

    private final String desc;

}
